﻿using System;
using System.Collections.Generic;
using System.Data;
using System.Linq;
using System.Text;
using Dapper;
using DapperWrapper;
using ZL.CRM.CommonEntity.AccOpr.Web;
using ZLWeb.WebApiEntity;
using ZLWeb.WebApiEntity.WechatCardModel;
using ZLWeb.WebApiEntityBase;
using ZLWeb.WebApiRepository.InterFace;
using ZilLion.Service.Core.CommonRepository;

namespace ZLWeb.WebApiRepository
{
    public class RegesiterRepository : CRMSqlServerRespository<ZL.CRM.CommonEntity.AccOpr.Web.AccThrOpenYwcore>, IRegesiterRepository
    {
        public RegesiterRepository(long? Accid) : base(Accid)
        {
        }

        public ResponseResultInfo SimpleRegesiter(ZL.CRM.CommonEntity.AccOpr.Web.AccThrOpenYwcore info, string oprpj)
        {
            DynamicParameters p = CreateDynamicParameters();
            List<Action<IDbConnection>> paActions = new List<Action<IDbConnection>>();
            var ywInfoparam= ExecuteProcAddParam(info, "#ywcore", true);
            paActions.Add(ywInfoparam);
            ExecuteProc(paActions, "pr_AccThrOpen_submit_new", p, null);
            return ReturnResponseResultInfo<ResponseResultInfo>(p) ?? new ResponseResultInfo();
        }
    }
}
